package itheima.com.Utiley;

import org.junit.Test;

import java.io.File;

public class FileInfomation {

    public static void main(String[] args) {


    }

    @Test
    public void info(){
        File file = new File("D:\\一条小团团\\xiao.txt");
//        file
        System.out.println("文件名称："+file.getName());
        System.out.println("文件绝对路径:"+file.getAbsolutePath());
        System.out.println("文件父类路径:"+file.getParent());
        System.out.println("文件大小:"+file.length());
        System.out.println("文件是否存在:"+file.exists());

        System.out.println("文件是否是目录:"+file.isDirectory());
        System.out.println("文件是否是文件:"+file.isFile());

    }

}
